<template>
  <web-view :src="url"></web-view>
</template>

<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app'
import { getCurrentInstance, ref } from 'vue'

const url = ref('')
const webView = ref(null)

onLoad(() => {
  const instance: any = getCurrentInstance()?.proxy
  const eventChannel = instance.getOpenerEventChannel()
  const token = uni.getStorageSync('accessToken')
  eventChannel.on('workInfo', async function (data: any) {
    url.value = `https://h5.orginone.cn/?companyId=${data.belongId}&appId=${data.applicationId}&workId=${data.id}&token=${token}`
  })
})
</script>
<style lang="scss">
@import '../../common/style/global.scss';
.todo-list {
  display: flex;
  align-items: center;
  position: relative;
  // justify-content: center;
}
.flex-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  // width: 260px;
}
.rg-time {
  position: absolute;
  right: 25px;
}
.fix-top {
  position: fixed;
  background: #fff;
  z-index: 1;
}
.mt108 {
  margin-top: 108px;
}
.wd200 {
  width: 170px;
}
.custom-work-result {
  height: calc(100vh - 430rpx);
}
</style>
